package org.mine.database.migration;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class StaticMonitor {
	
//	String projListUrl = "http://mapi.damai.cn/projList.aspx?p=%d&ps=50";
//	static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20);  
//	public static void main(String[] args) {
//		for(int i = 1;;i++){
//			String projecListResponse = HttpRequestUtil.sendGetOkHttp("http://mapi.damai.cn/projLst.aspx?p=" + i + "&ps=50", 2000);
//			JSONObject projectList = JSON.parseObject(projecListResponse);
//			
//			if(projectList == null){
//				continue;
//			}
//			
//			if(projectList.getJSONArray("l") == null || projectList.getJSONArray("l").size() == 0){
//				break;
//			}
//			
//			JSONArray projectArray = projectList.getJSONArray("l");
//			int index = 0;
//			for(;index < projectArray.size(); index++){
//				JSONObject project = projectArray.getJSONObject(index);
//				long projectId = project.getLongValue("i");
//				Monitor monitor = new Monitor();
//				monitor.setProjectId(projectId);
//				fixedThreadPool.execute(monitor);
//			}
//		}
//	}
}

class Monitor extends Thread{
	private static Logger logger = LoggerFactory.getLogger(Monitor.class);
	private static String ossUrl = "http://damaimaitian.oss-cn-beijing.aliyuncs.com/project/info/%d";
	
	private long projectId;
	
	public long getProjectId() {
		return projectId;
	}

	public void setProjectId(long projectId) {
		this.projectId = projectId;
	}

	@Override
	public void run() {
		
	}
	
}
